<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.11"/>
<title>Superpixel Benchmark: Evaluation Class Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<script type="text/javascript">
  $(document).ready(function() { init_search(); });
</script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectalign" style="padding-left: 0.5em;">
   <div id="projectname">Superpixel Benchmark
   </div>
   <div id="projectbrief">Superpixel benchmark, tools and algorithms.</div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.11 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Main&#160;Page</span></a></li>
      <li><a href="pages.html"><span>Related&#160;Pages</span></a></li>
      <li class="current"><a href="annotated.html"><span>Classes</span></a></li>
      <li><a href="files.html"><span>Files</span></a></li>
      <li>
        <div id="MSearchBox" class="MSearchBoxInactive">
        <span class="left">
          <img id="MSearchSelect" src="search/mag_sel.png"
               onmouseover="return searchBox.OnSearchSelectShow()"
               onmouseout="return searchBox.OnSearchSelectHide()"
               alt=""/>
          <input type="text" id="MSearchField" value="Search" accesskey="S"
               onfocus="searchBox.OnSearchFieldFocus(true)" 
               onblur="searchBox.OnSearchFieldFocus(false)" 
               onkeyup="searchBox.OnSearchFieldChange(event)"/>
          </span><span class="right">
            <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
          </span>
        </div>
      </li>
    </ul>
  </div>
  <div id="navrow2" class="tabs2">
    <ul class="tablist">
      <li><a href="annotated.html"><span>Class&#160;List</span></a></li>
      <li><a href="classes.html"><span>Class&#160;Index</span></a></li>
      <li><a href="hierarchy.html"><span>Class&#160;Hierarchy</span></a></li>
      <li><a href="functions.html"><span>Class&#160;Members</span></a></li>
    </ul>
  </div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

</div><!-- top -->
<div class="header">
  <div class="summary">
<a href="#pub-static-methods">Static Public Member Functions</a> &#124;
<a href="#friends">Friends</a> &#124;
<a href="classEvaluation-members.html">List of all members</a>  </div>
  <div class="headertitle">
<div class="title">Evaluation Class Reference</div>  </div>
</div><!--header-->
<div class="contents">

<p>Provides measures to evaluate (over-) segmentations.  
 <a href="classEvaluation.html#details">More...</a></p>

<p><code>#include &lt;<a class="el" href="evaluation_8h_source.html">evaluation.h</a>&gt;</code></p>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-static-methods"></a>
Static Public Member Functions</h2></td></tr>
<tr class="memitem:af8a282b1998229e19a96b716fa688ce1"><td class="memItemLeft" align="right" valign="top">static float&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classEvaluation.html#af8a282b1998229e19a96b716fa688ce1">computeUndersegmentationError</a> (const cv::Mat &amp;labels, const cv::Mat &amp;gt)</td></tr>
<tr class="memdesc:af8a282b1998229e19a96b716fa688ce1"><td class="mdescLeft">&#160;</td><td class="mdescRight">Compute the Undersegmentation error as follows:  <a href="#af8a282b1998229e19a96b716fa688ce1">More...</a><br /></td></tr>
<tr class="separator:af8a282b1998229e19a96b716fa688ce1"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a49b684e757143c509751cfe589630bbe"><td class="memItemLeft" align="right" valign="top">static float&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classEvaluation.html#a49b684e757143c509751cfe589630bbe">computeOversegmentationError</a> (const cv::Mat &amp;labels, const cv::Mat &amp;gt)</td></tr>
<tr class="separator:a49b684e757143c509751cfe589630bbe"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a128b4699911da24fcc5daf1e17e90589"><td class="memItemLeft" align="right" valign="top">static float&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classEvaluation.html#a128b4699911da24fcc5daf1e17e90589">computeBoundaryRecall</a> (const cv::Mat &amp;labels, const cv::Mat &amp;gt, float d=0.0025)</td></tr>
<tr class="memdesc:a128b4699911da24fcc5daf1e17e90589"><td class="mdescLeft">&#160;</td><td class="mdescRight">Compute boundary recall:  <a href="#a128b4699911da24fcc5daf1e17e90589">More...</a><br /></td></tr>
<tr class="separator:a128b4699911da24fcc5daf1e17e90589"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a0c34c609ceca0f0734f6698a2b3e35ec"><td class="memItemLeft" align="right" valign="top">static float&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classEvaluation.html#a0c34c609ceca0f0734f6698a2b3e35ec">computeBoundaryPrecision</a> (const cv::Mat &amp;labels, const cv::Mat &amp;gt, float d=0.0025)</td></tr>
<tr class="memdesc:a0c34c609ceca0f0734f6698a2b3e35ec"><td class="mdescLeft">&#160;</td><td class="mdescRight">Compute boundary precision:  <a href="#a0c34c609ceca0f0734f6698a2b3e35ec">More...</a><br /></td></tr>
<tr class="separator:a0c34c609ceca0f0734f6698a2b3e35ec"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ad3abfa7644d3a4dc6744a7b7fe2e5002"><td class="memItemLeft" align="right" valign="top">static float&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classEvaluation.html#ad3abfa7644d3a4dc6744a7b7fe2e5002">computeExplainedVariation</a> (const cv::Mat &amp;labels, const cv::Mat &amp;image)</td></tr>
<tr class="memdesc:ad3abfa7644d3a4dc6744a7b7fe2e5002"><td class="mdescLeft">&#160;</td><td class="mdescRight">Compute the explained variation of the given segmentation.  <a href="#ad3abfa7644d3a4dc6744a7b7fe2e5002">More...</a><br /></td></tr>
<tr class="separator:ad3abfa7644d3a4dc6744a7b7fe2e5002"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:adde962b47ac0b440e5830e3208d0e0b8"><td class="memItemLeft" align="right" valign="top">static float&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classEvaluation.html#adde962b47ac0b440e5830e3208d0e0b8">computeNPUndersegmentationError</a> (const cv::Mat &amp;labels, const cv::Mat &amp;gt)</td></tr>
<tr class="memdesc:adde962b47ac0b440e5830e3208d0e0b8"><td class="mdescLeft">&#160;</td><td class="mdescRight">Computes the Undersegmentation Error (Neubert, Protzel):  <a href="#adde962b47ac0b440e5830e3208d0e0b8">More...</a><br /></td></tr>
<tr class="separator:adde962b47ac0b440e5830e3208d0e0b8"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ab36bd76a550d2950ca784203958a009c"><td class="memItemLeft" align="right" valign="top">static float&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classEvaluation.html#ab36bd76a550d2950ca784203958a009c">computeLevinUndersegmentationError</a> (const cv::Mat &amp;labels, const cv::Mat &amp;gt)</td></tr>
<tr class="memdesc:ab36bd76a550d2950ca784203958a009c"><td class="mdescLeft">&#160;</td><td class="mdescRight">Compute the Undersegmentation Error (Levinshtein et al.):  <a href="#ab36bd76a550d2950ca784203958a009c">More...</a><br /></td></tr>
<tr class="separator:ab36bd76a550d2950ca784203958a009c"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aef5c7ea4d51e3b12639aa3b4ccb76c1f"><td class="memItemLeft" align="right" valign="top">static float&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classEvaluation.html#aef5c7ea4d51e3b12639aa3b4ccb76c1f">computeAchievableSegmentationAccuracy</a> (const cv::Mat &amp;labels, const cv::Mat &amp;gt)</td></tr>
<tr class="memdesc:aef5c7ea4d51e3b12639aa3b4ccb76c1f"><td class="mdescLeft">&#160;</td><td class="mdescRight">Compute achievable segmentation accuracy as follows:  <a href="#aef5c7ea4d51e3b12639aa3b4ccb76c1f">More...</a><br /></td></tr>
<tr class="separator:aef5c7ea4d51e3b12639aa3b4ccb76c1f"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:abfb874f7c79b928c061ff3b852571f0f"><td class="memItemLeft" align="right" valign="top">static float&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classEvaluation.html#abfb874f7c79b928c061ff3b852571f0f">computeSumOfSquaredErrorRGB</a> (const cv::Mat &amp;labels, const cv::Mat &amp;image)</td></tr>
<tr class="memdesc:abfb874f7c79b928c061ff3b852571f0f"><td class="mdescLeft">&#160;</td><td class="mdescRight">Compute Sum-of-Squared Error on RGB.  <a href="#abfb874f7c79b928c061ff3b852571f0f">More...</a><br /></td></tr>
<tr class="separator:abfb874f7c79b928c061ff3b852571f0f"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a64e716bd15eb34a32bf23494f27242c0"><td class="memItemLeft" align="right" valign="top">static float&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classEvaluation.html#a64e716bd15eb34a32bf23494f27242c0">computeSumOfSquaredErrorXY</a> (const cv::Mat &amp;labels, const cv::Mat &amp;image)</td></tr>
<tr class="memdesc:a64e716bd15eb34a32bf23494f27242c0"><td class="mdescLeft">&#160;</td><td class="mdescRight">Compute Sum-of-Squared Error XY.  <a href="#a64e716bd15eb34a32bf23494f27242c0">More...</a><br /></td></tr>
<tr class="separator:a64e716bd15eb34a32bf23494f27242c0"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a7124f448f6e35f0659a211972fe7cd2c"><td class="memItemLeft" align="right" valign="top">static float&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classEvaluation.html#a7124f448f6e35f0659a211972fe7cd2c">computeMeanDistanceToEdge</a> (const cv::Mat &amp;labels, const cv::Mat &amp;gt)</td></tr>
<tr class="memdesc:a7124f448f6e35f0659a211972fe7cd2c"><td class="mdescLeft">&#160;</td><td class="mdescRight">Compute Mean Distance to Edge:  <a href="#a7124f448f6e35f0659a211972fe7cd2c">More...</a><br /></td></tr>
<tr class="separator:a7124f448f6e35f0659a211972fe7cd2c"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a7a12efee6f8dbed373ddf6667d12463b"><td class="memItemLeft" align="right" valign="top">static float&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classEvaluation.html#a7a12efee6f8dbed373ddf6667d12463b">computeIntraClusterVariation</a> (const cv::Mat &amp;labels, const cv::Mat &amp;image)</td></tr>
<tr class="memdesc:a7a12efee6f8dbed373ddf6667d12463b"><td class="mdescLeft">&#160;</td><td class="mdescRight">Compute Intra-Cluster Variation, that is the average standard deviation over all superpixels.  <a href="#a7a12efee6f8dbed373ddf6667d12463b">More...</a><br /></td></tr>
<tr class="separator:a7a12efee6f8dbed373ddf6667d12463b"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aa143fb3c273f961c7f52962e83fd4483"><td class="memItemLeft" align="right" valign="top">static float&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classEvaluation.html#aa143fb3c273f961c7f52962e83fd4483">computeCompactness</a> (const cv::Mat &amp;labels)</td></tr>
<tr class="memdesc:aa143fb3c273f961c7f52962e83fd4483"><td class="mdescLeft">&#160;</td><td class="mdescRight">Compute Compactness as follows:  <a href="#aa143fb3c273f961c7f52962e83fd4483">More...</a><br /></td></tr>
<tr class="separator:aa143fb3c273f961c7f52962e83fd4483"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a95544f9633b7245e7c448b8dda151e9c"><td class="memItemLeft" align="right" valign="top">static float&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classEvaluation.html#a95544f9633b7245e7c448b8dda151e9c">computeContourDensity</a> (const cv::Mat &amp;labels)</td></tr>
<tr class="memdesc:a95544f9633b7245e7c448b8dda151e9c"><td class="mdescLeft">&#160;</td><td class="mdescRight">Contour Density is given as.  <a href="#a95544f9633b7245e7c448b8dda151e9c">More...</a><br /></td></tr>
<tr class="separator:a95544f9633b7245e7c448b8dda151e9c"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a1f4d19a505e0e1faf921af680b5231e6"><td class="memItemLeft" align="right" valign="top">static float&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classEvaluation.html#a1f4d19a505e0e1faf921af680b5231e6">computeRegularity</a> (const cv::Mat &amp;labels)</td></tr>
<tr class="memdesc:a1f4d19a505e0e1faf921af680b5231e6"><td class="mdescLeft">&#160;</td><td class="mdescRight">Regularity can be computed as the fraction of boundary pixels of a superpixels and the boundary pixels of the corresponding bounding boxes.  <a href="#a1f4d19a505e0e1faf921af680b5231e6">More...</a><br /></td></tr>
<tr class="separator:a1f4d19a505e0e1faf921af680b5231e6"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:adbfc9d825610435a834ec7f2ba22f560"><td class="memItemLeft" align="right" valign="top">static int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classEvaluation.html#adbfc9d825610435a834ec7f2ba22f560">computeSuperpixels</a> (const cv::Mat &amp;labels)</td></tr>
<tr class="memdesc:adbfc9d825610435a834ec7f2ba22f560"><td class="mdescLeft">&#160;</td><td class="mdescRight">Count the number of superpixels.  <a href="#adbfc9d825610435a834ec7f2ba22f560">More...</a><br /></td></tr>
<tr class="separator:adbfc9d825610435a834ec7f2ba22f560"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a59a49d972a3655d83309ad52e659dfb8"><td class="memItemLeft" align="right" valign="top">static void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classEvaluation.html#a59a49d972a3655d83309ad52e659dfb8">computeSuperpixelSizes</a> (const cv::Mat &amp;labels, float &amp;average_size, int &amp;min_size, int &amp;max_size, float &amp;size_variation)</td></tr>
<tr class="memdesc:a59a49d972a3655d83309ad52e659dfb8"><td class="mdescLeft">&#160;</td><td class="mdescRight">Compute superpixel size statistics.  <a href="#a59a49d972a3655d83309ad52e659dfb8">More...</a><br /></td></tr>
<tr class="separator:a59a49d972a3655d83309ad52e659dfb8"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a4d59556e828d97ee7f3e878ee82ab102"><td class="memItemLeft" align="right" valign="top">static float&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classEvaluation.html#a4d59556e828d97ee7f3e878ee82ab102">computeEdgeRecall</a> (const cv::Mat &amp;labels, const cv::Mat &amp;edges, float d=0.0025)</td></tr>
<tr class="memdesc:a4d59556e828d97ee7f3e878ee82ab102"><td class="mdescLeft">&#160;</td><td class="mdescRight">Compute edge recall based on a computed edge map.  <a href="#a4d59556e828d97ee7f3e878ee82ab102">More...</a><br /></td></tr>
<tr class="separator:a4d59556e828d97ee7f3e878ee82ab102"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a7c87a67f00a39ae1d57f9d701e74b1df"><td class="memItemLeft" align="right" valign="top">static float&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classEvaluation.html#a7c87a67f00a39ae1d57f9d701e74b1df">computeAverageMetric</a> (const std::vector&lt; float &gt; &amp;values, const std::vector&lt; float &gt; &amp;superpixels, int min_superpixels=200, int max_superpixels=5200)</td></tr>
<tr class="memdesc:a7c87a67f00a39ae1d57f9d701e74b1df"><td class="mdescLeft">&#160;</td><td class="mdescRight">Computes the average of a metric, i.e. computes the integral of the metric in the given superpixel range using the trapezoidal rule.  <a href="#a7c87a67f00a39ae1d57f9d701e74b1df">More...</a><br /></td></tr>
<tr class="separator:a7c87a67f00a39ae1d57f9d701e74b1df"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="friends"></a>
Friends</h2></td></tr>
<tr class="memitem:a8d5a9fbbfce7fe694848fd0a890328c0"><td class="memItemLeft" align="right" valign="top">class&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classEvaluation.html#a8d5a9fbbfce7fe694848fd0a890328c0">Visualization</a></td></tr>
<tr class="separator:a8d5a9fbbfce7fe694848fd0a890328c0"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><p>Provides measures to evaluate (over-) segmentations. </p>
<p>Copyright (c) 2016, David Stutz Contact: <a href="#" onclick="location.href='mai'+'lto:'+'dav'+'id'+'.st'+'ut'+'z@r'+'wt'+'h-a'+'ac'+'hen'+'.d'+'e'; return false;">david<span style="display: none;">.nosp@m.</span>.stu<span style="display: none;">.nosp@m.</span>tz@rw<span style="display: none;">.nosp@m.</span>th-a<span style="display: none;">.nosp@m.</span>achen<span style="display: none;">.nosp@m.</span>.de</a>, davidstutz.de All rights reserved.</p>
<p>Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:</p>
<ol type="1">
<li>Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.</li>
<li>Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.</li>
<li>Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.</li>
</ol>
<p>THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.</p><dl class="section author"><dt>Author</dt><dd>David Stutz </dd></dl>
</div><h2 class="groupheader">Member Function Documentation</h2>
<a class="anchor" id="aef5c7ea4d51e3b12639aa3b4ccb76c1f"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">float Evaluation::computeAchievableSegmentationAccuracy </td>
          <td>(</td>
          <td class="paramtype">const cv::Mat &amp;&#160;</td>
          <td class="paramname"><em>labels</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const cv::Mat &amp;&#160;</td>
          <td class="paramname"><em>gt</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">static</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Compute achievable segmentation accuracy as follows: </p>
<p><img class="formulaInl" alt="$ASA(G, S) = \frac{1}{N_t} \sum_{S_j \in S} |S_j \cap G_{g(j)}|$" src="form_5.png"/></p>
<p>where <img class="formulaInl" alt="$g(j)$" src="form_6.png"/> is the ground truth segment with maximum overlap with $S_j$.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">labels</td><td>superpixel labels as int image [in] gt ground truth segmentation as int image </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>ASA(gt, labels) </dd></dl>

</div>
</div>
<a class="anchor" id="a7c87a67f00a39ae1d57f9d701e74b1df"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">float Evaluation::computeAverageMetric </td>
          <td>(</td>
          <td class="paramtype">const std::vector&lt; float &gt; &amp;&#160;</td>
          <td class="paramname"><em>values</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const std::vector&lt; float &gt; &amp;&#160;</td>
          <td class="paramname"><em>superpixels</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>min_superpixels</em> = <code>200</code>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>max_superpixels</em> = <code>5200</code>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">static</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Computes the average of a metric, i.e. computes the integral of the metric in the given superpixel range using the trapezoidal rule. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">values</td><td>metric values </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">superpixels</td><td>number of superpixels corresponding to the metric values </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">min_superpixels</td><td>lower interval bound for intergration </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">max_superpixels</td><td>upper interval bound for integration </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a class="anchor" id="a0c34c609ceca0f0734f6698a2b3e35ec"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">float Evaluation::computeBoundaryPrecision </td>
          <td>(</td>
          <td class="paramtype">const cv::Mat &amp;&#160;</td>
          <td class="paramname"><em>labels</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const cv::Mat &amp;&#160;</td>
          <td class="paramname"><em>gt</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">float&#160;</td>
          <td class="paramname"><em>d</em> = <code>0.0025</code>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">static</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Compute boundary precision: </p>
<p><img class="formulaInl" alt="$Pre(S, G) = \frac{TP}{TP + FP}$" src="form_2.png"/></p>
<p>where TP is the number of true positives, and FP is the number of false positives.</p>
<p>For each boundary pixel in the G, the corresponding boundary pixel in S is allowed to deviate by a euclidean distance of d times the image diagonal.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">labels</td><td>superpixel labels as int image [in] gt ground truth segmentation as int image </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">d</td><td>fraction of the diagonal to use as tolerance </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>Pre(labels, gt) </dd></dl>

</div>
</div>
<a class="anchor" id="a128b4699911da24fcc5daf1e17e90589"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">float Evaluation::computeBoundaryRecall </td>
          <td>(</td>
          <td class="paramtype">const cv::Mat &amp;&#160;</td>
          <td class="paramname"><em>labels</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const cv::Mat &amp;&#160;</td>
          <td class="paramname"><em>gt</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">float&#160;</td>
          <td class="paramname"><em>d</em> = <code>0.0025</code>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">static</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Compute boundary recall: </p>
<p><img class="formulaInl" alt="$Rec(S, G) = \frac{TP}{TP + FN}$" src="form_1.png"/></p>
<p>where TP is the number of true positives, and FN is the number of false negatives.</p>
<p>For each boundary pixel in the G, the corresponding boundary pixel in S is allowed to deviate by a euclidean distance of d times the image diagonal.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">labels</td><td>superpixel labels as int image </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">gt</td><td>ground truth segmentation as int image </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">d</td><td>fraction of the diagonal to use as tolerance </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>Rec(labels, gt)</dd></dl>
<p>Copyright (c) 2016, David Stutz Contact: <a href="#" onclick="location.href='mai'+'lto:'+'dav'+'id'+'.st'+'ut'+'z@r'+'wt'+'h-a'+'ac'+'hen'+'.d'+'e'; return false;">david<span style="display: none;">.nosp@m.</span>.stu<span style="display: none;">.nosp@m.</span>tz@rw<span style="display: none;">.nosp@m.</span>th-a<span style="display: none;">.nosp@m.</span>achen<span style="display: none;">.nosp@m.</span>.de</a>, davidstutz.de All rights reserved.</p>
<p>Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:</p>
<ol type="1">
<li>Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.</li>
<li>Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.</li>
<li>Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.</li>
</ol>
<p>THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. </p>

</div>
</div>
<a class="anchor" id="aa143fb3c273f961c7f52962e83fd4483"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">float Evaluation::computeCompactness </td>
          <td>(</td>
          <td class="paramtype">const cv::Mat &amp;&#160;</td>
          <td class="paramname"><em>labels</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">static</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Compute Compactness as follows: </p>
<p><img class="formulaInl" alt="$CO(S) = \sum_{S_j in S} \frac{|S_j|}{N} \frac{4*pi*A(S_j)}{L(S_j)*L(S_j)}$" src="form_8.png"/></p>
<p>where <img class="formulaInl" alt="$A(S_j)$" src="form_9.png"/> is the area and <img class="formulaInl" alt="$L(S_j)$" src="form_10.png"/> the perimeter of the superpixel <img class="formulaInl" alt="$S_j$" src="form_11.png"/>.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">labels</td><td>superpixel labels as int image </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>CO(labels) </dd></dl>

</div>
</div>
<a class="anchor" id="a95544f9633b7245e7c448b8dda151e9c"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">float Evaluation::computeContourDensity </td>
          <td>(</td>
          <td class="paramtype">const cv::Mat &amp;&#160;</td>
          <td class="paramname"><em>labels</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">static</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Contour Density is given as. </p>
<p><img class="formulaInl" alt="$CD(S) = \frac{|C|}{N}$" src="form_12.png"/></p>
<p>where C is the set of all contours int he superpixel segmentation and N the number of pixels.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">labels</td><td>superpixel labels as int image </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>CD(labels) </dd></dl>

</div>
</div>
<a class="anchor" id="a4d59556e828d97ee7f3e878ee82ab102"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">float Evaluation::computeEdgeRecall </td>
          <td>(</td>
          <td class="paramtype">const cv::Mat &amp;&#160;</td>
          <td class="paramname"><em>labels</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const cv::Mat &amp;&#160;</td>
          <td class="paramname"><em>edges</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">float&#160;</td>
          <td class="paramname"><em>d</em> = <code>0.0025</code>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">static</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Compute edge recall based on a computed edge map. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">labels</td><td>superpixel labels as int image </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">edges</td><td>and edge map as unsigned char image </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">d</td><td>fraction of the diagonal used as tolerance </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>edge recall </dd></dl>

</div>
</div>
<a class="anchor" id="ad3abfa7644d3a4dc6744a7b7fe2e5002"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">float Evaluation::computeExplainedVariation </td>
          <td>(</td>
          <td class="paramtype">const cv::Mat &amp;&#160;</td>
          <td class="paramname"><em>labels</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const cv::Mat &amp;&#160;</td>
          <td class="paramname"><em>image</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">static</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Compute the explained variation of the given segmentation. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">labels</td><td>superpixel labels as int image </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">image</td><td>image of the corresponding superpixel labels </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>explained variation </dd></dl>

</div>
</div>
<a class="anchor" id="a7a12efee6f8dbed373ddf6667d12463b"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">float Evaluation::computeIntraClusterVariation </td>
          <td>(</td>
          <td class="paramtype">const cv::Mat &amp;&#160;</td>
          <td class="paramname"><em>labels</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const cv::Mat &amp;&#160;</td>
          <td class="paramname"><em>image</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">static</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Compute Intra-Cluster Variation, that is the average standard deviation over all superpixels. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">labels</td><td>superpixel labels as int image </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">image</td><td>image corresponding to the superpixel labels </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>intra-cluster variation </dd></dl>

</div>
</div>
<a class="anchor" id="ab36bd76a550d2950ca784203958a009c"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">float Evaluation::computeLevinUndersegmentationError </td>
          <td>(</td>
          <td class="paramtype">const cv::Mat &amp;&#160;</td>
          <td class="paramname"><em>labels</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const cv::Mat &amp;&#160;</td>
          <td class="paramname"><em>gt</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">static</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Compute the Undersegmentation Error (Levinshtein et al.): </p>
<p><img class="formulaInl" alt="$UE_{Levin}(S, G) = \frac{1}{|G|} \sum_{G_i \in G} \frac{\sum_{S_j \cap G_i \neq \emptyset} |S_j| - |G_i|}{|G_i|}$" src="form_4.png"/></p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">labels</td><td>superpixel labels as int image [in] gt ground truth segmentation as int image </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>UE_Levin(labels, gt) </dd></dl>

</div>
</div>
<a class="anchor" id="a7124f448f6e35f0659a211972fe7cd2c"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">float Evaluation::computeMeanDistanceToEdge </td>
          <td>(</td>
          <td class="paramtype">const cv::Mat &amp;&#160;</td>
          <td class="paramname"><em>labels</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const cv::Mat &amp;&#160;</td>
          <td class="paramname"><em>gt</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">static</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Compute Mean Distance to Edge: </p>
<p><img class="formulaInl" alt="$MDE(S, G) = \frac{1}{|B|} \sum_{b \in B} D(b)$" src="form_7.png"/></p>
<p>where B is the set of boundary pixels in the ground truth segmentation G and D is a distance transform image of the superpixel segmentation S.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">labels</td><td>superpixel labels as int image </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">gt</td><td>ground truth segmentation as int image </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>MDE(labels, gt) </dd></dl>

</div>
</div>
<a class="anchor" id="adde962b47ac0b440e5830e3208d0e0b8"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">float Evaluation::computeNPUndersegmentationError </td>
          <td>(</td>
          <td class="paramtype">const cv::Mat &amp;&#160;</td>
          <td class="paramname"><em>labels</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const cv::Mat &amp;&#160;</td>
          <td class="paramname"><em>gt</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">static</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Computes the Undersegmentation Error (Neubert, Protzel): </p>
<p><img class="formulaInl" alt="$UE_{NP}(S, G) = \frac{1}{N} \sum_{G_i \in G} \sum_{S_j \cap G_i \neq \emptyset} \min\{S_j \cap G_i, S_j - g_i\}$" src="form_3.png"/></p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">labels</td><td>superpixel labels as int image [in] gt ground truth segmentation as int image </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>UE_NP(labels, gt) </dd></dl>

</div>
</div>
<a class="anchor" id="a49b684e757143c509751cfe589630bbe"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">float Evaluation::computeOversegmentationError </td>
          <td>(</td>
          <td class="paramtype">const cv::Mat &amp;&#160;</td>
          <td class="paramname"><em>labels</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const cv::Mat &amp;&#160;</td>
          <td class="paramname"><em>gt</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">static</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>$</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">sv_video</td><td></td></tr>
    <tr><td class="paramname">gt_video</td><td></td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd></dd></dl>

</div>
</div>
<a class="anchor" id="a1f4d19a505e0e1faf921af680b5231e6"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">float Evaluation::computeRegularity </td>
          <td>(</td>
          <td class="paramtype">const cv::Mat &amp;&#160;</td>
          <td class="paramname"><em>labels</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">static</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Regularity can be computed as the fraction of boundary pixels of a superpixels and the boundary pixels of the corresponding bounding boxes. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">labels</td><td>superpixel labels as int image </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>regularity </dd></dl>

</div>
</div>
<a class="anchor" id="abfb874f7c79b928c061ff3b852571f0f"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">float Evaluation::computeSumOfSquaredErrorRGB </td>
          <td>(</td>
          <td class="paramtype">const cv::Mat &amp;&#160;</td>
          <td class="paramname"><em>labels</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const cv::Mat &amp;&#160;</td>
          <td class="paramname"><em>image</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">static</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Compute Sum-of-Squared Error on RGB. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">labels</td><td>superpixel labels as int image </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">image</td><td>image corresponding to the superpixel labels </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>sum-of-squared error on RGB </dd></dl>

</div>
</div>
<a class="anchor" id="a64e716bd15eb34a32bf23494f27242c0"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">float Evaluation::computeSumOfSquaredErrorXY </td>
          <td>(</td>
          <td class="paramtype">const cv::Mat &amp;&#160;</td>
          <td class="paramname"><em>labels</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const cv::Mat &amp;&#160;</td>
          <td class="paramname"><em>image</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">static</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Compute Sum-of-Squared Error XY. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">labels</td><td>superpixel labels as int image </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">image</td><td>image corresponding to the superpixel labels </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>sum-of-squared error on XY </dd></dl>

</div>
</div>
<a class="anchor" id="adbfc9d825610435a834ec7f2ba22f560"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">int Evaluation::computeSuperpixels </td>
          <td>(</td>
          <td class="paramtype">const cv::Mat &amp;&#160;</td>
          <td class="paramname"><em>labels</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">static</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Count the number of superpixels. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">labels</td><td>superpixel labels as int image </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>number of superpixels </dd></dl>

</div>
</div>
<a class="anchor" id="a59a49d972a3655d83309ad52e659dfb8"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">void Evaluation::computeSuperpixelSizes </td>
          <td>(</td>
          <td class="paramtype">const cv::Mat &amp;&#160;</td>
          <td class="paramname"><em>labels</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">float &amp;&#160;</td>
          <td class="paramname"><em>average_size</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int &amp;&#160;</td>
          <td class="paramname"><em>min_size</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int &amp;&#160;</td>
          <td class="paramname"><em>max_size</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">float &amp;&#160;</td>
          <td class="paramname"><em>size_variation</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">static</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Compute superpixel size statistics. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">labels</td><td>superpixel labels as int image </td></tr>
    <tr><td class="paramdir">[out]</td><td class="paramname">average_size</td><td>average size of superpixels </td></tr>
    <tr><td class="paramdir">[out]</td><td class="paramname">min_size</td><td>minimum size of superpixels </td></tr>
    <tr><td class="paramdir">[out]</td><td class="paramname">max_size</td><td>maximum size of superpixels </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a class="anchor" id="af8a282b1998229e19a96b716fa688ce1"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">float Evaluation::computeUndersegmentationError </td>
          <td>(</td>
          <td class="paramtype">const cv::Mat &amp;&#160;</td>
          <td class="paramname"><em>labels</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const cv::Mat &amp;&#160;</td>
          <td class="paramname"><em>gt</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">static</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Compute the Undersegmentation error as follows: </p>
<p><img class="formulaInl" alt="$UE(G, S) = \frac{1}{N} = \sum_{S_j \in S} \min_{G_i} \{|G_i - S_j|\}$" src="form_0.png"/></p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">labels</td><td>superpixel labels as int image </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">gt</td><td>ground truth segmentation as int image </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>UE(gt, labels) </dd></dl>

</div>
</div>
<h2 class="groupheader">Friends And Related Function Documentation</h2>
<a class="anchor" id="a8d5a9fbbfce7fe694848fd0a890328c0"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">friend class <a class="el" href="classVisualization.html">Visualization</a></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">friend</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

</div>
</div>
<hr/>The documentation for this class was generated from the following files:<ul>
<li>lib_eval/<a class="el" href="evaluation_8h_source.html">evaluation.h</a></li>
<li>lib_eval/<a class="el" href="lib__eval_2evaluation_8cpp.html">evaluation.cpp</a></li>
</ul>
</div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated on Sun Apr 16 2017 16:39:17 for Superpixel Benchmark by &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.11
</small></address>
</body>
</html>
